Parse /** */
comments and extracts context from SCSS.
Install
npm install --save scsscommentparser
Usage
var ScssCommentParser = require('scsscommentparser');
var annotations = {
_: {
alias: {
'aliasTest': 'annotationTest'
}
},
annotationTest: function ( commentLine ) {
return 'Working';
}
};
var parser = new ScssCommentParser( annotations );
var scss =
var comments = parser.parse ( scss );
console.log(comments);
Changelog
0.5.0
- Update to `cdocparser@0.4.0
- Add support for configuration passed to the extractor.
0.4.0
- Update to
cdocparser@0.3.0
supporting ///
comments - Include a
context.line
with start, end
value for each detected code part
0.3.2
- Added
context.code
to type placeholder
.
0.3.1
0.3.0
- Add placeholder support (thanks to callum)
0.2.4
- Remove first opening and last closing brace in
context.code
0.2.3
- Fixed wrong code extraction for
function
and mixin
. (See #11)
0.2.2
- Added
context.code
to type function
and mixin
containing the whole code.
0.2.1
- Fix bug in detection of comment blocks
0.1.2
0.1.1
- Fix multiline annotations to include
@
0.1.0